<!-- App.vue -->
<template>
  <MySalaryInfo :salaryInfo="salaryInfo" /> <br />
  <button @click="setSalary">修改薪⽔信息</button>
</template>
<script setup lang="ts">
//引⼊⼦组件
import MySalaryInfo from './MySalaryInfo1.vue';
import { reactive } from 'vue';

let salaryInfo = reactive({
  userName: "王⼀", salary: 15000
})
function setSalary() {
  salaryInfo.salary += 1000
  console.log(salaryInfo)
}
</script>
<style scoped></style>
